package com.hf.work03;

/**
 * 销售人员工资
 * @author Lenovo-Healer
 */
public class SalesEmployee extends ColaEmployee{
    /**
     * 销售额
     */
    private double saleroom;
    /**
     * 提成率
     */
    private double royaltyRate;

    /**
     * @param month 月份
     * @return 工资
     */
    @Override
    public double getSalary(int month) {
        return super.getSalary(month) + (this.getSaleroom() * this.getRoyaltyRate());
    }

    /**
     * 无参构造方法
     */
    public SalesEmployee() {
    }

    /**
     * 有参构造方法
     * @param empName 姓名
     * @param birthdayMonth 生日月份
     */
    public SalesEmployee(String empName, int birthdayMonth, double saleroom, double royaltyRate) {
        super(empName, birthdayMonth);
        this.saleroom = saleroom;
        this.royaltyRate = royaltyRate;
    }

    public double getSaleroom() {
        return saleroom;
    }

    public void setSaleroom(double saleroom) {
        this.saleroom = saleroom;
    }

    public double getRoyaltyRate() {
        return royaltyRate;
    }

    public void setRoyaltyRate(double royaltyRate) {
        this.royaltyRate = royaltyRate;
    }
}
